<div class="content-wrapper">

    <section class="content-header">
        <?php echo $this->partial('layout/breadcrumb'); ?>
        <h1 class="pull-right">
            <?php if (!$this->locationStore) echo '<span class="text-sm text-red text-bold">' . $this->translate('安装 自提点管理台 插件后，核销人员可用') . '</span>'; ?>
            <a href="<?php echo $this->url('self-location', ['action'=> 'addMember']);?>" class="btn btn-primary btn-sm"><i class="fa fa-plus"></i> <?php echo $this->translate('添加核销人员'); ?></a>
            <?php echo $this->HelpUrl('locationMember'); ?>
        </h1>

    </section>

    <section class="content">
        <?php echo $this->partial('layout/messages'); ?>

        <div class="row">
            <div class="col-xs-12">
                <div class="box shop-box">

                    <div class="box-body table-responsive no-padding">
                        <table class="table table-hover">
                            <thead>
                            <tr class="shop-bg-thead">
                                <th><?php echo $this->translate('登录账号'); ?></th>
                                <th width="10%"><?php echo $this->translate('姓名'); ?></th>
                                <th width="15%"><?php echo $this->translate('联系电话'); ?></th>
                                <th width="20%"><?php echo $this->translate('所属自提点'); ?></th>
                                <th width="8%"><?php echo $this->translate('状态'); ?></th>
                                <th width="15%"><?php echo $this->translate('添加时间'); ?></th>
                                <th width="18%"><?php echo $this->translate('操作'); ?></th>
                            </tr>
                            </thead>
                            <tbody>
                            <?php if($this->memberList) foreach ($this->memberList as $value) { ?>
                                <tr>
                                    <td><?php echo $this->escapeHtml($value[0]->getMemberAccount()); ?></td>
                                    <td><?php echo $this->escapeHtml($value[0]->getMembername()); ?></td>
                                    <td><?php echo $this->escapeHtml($value[0]->getMemberPhone()); ?></td>
                                    <td><?php echo $this->escapeHtml($value['locationName']); ?></td>
                                    <td><?php echo $this->adminHelper()->selfLocationMemberState($value[0]->getMemberState()); ?></td>
                                    <td><?php echo $this->shopDateFormat()->adminAddTime($value[0]->getMemberAddTime()); ?></td>
                                    <td>
                                        <a href="<?php echo $this->url('self-location',
                                            ['action'=>'editMember', 'id' => $value[0]->getMemberId()]); ?>"
                                           class="btn btn-xs btn-success"><i class="fa fa-pencil"></i> <?php echo $this->translate('编辑'); ?></a>
                                        <a href="<?php echo $this->url('self-location',
                                            ['action'=>'changeMemberPassword', 'id' => $value[0]->getMemberId()]); ?>"
                                           class="btn btn-xs btn-success"><i class="fa fa-pencil"></i> <?php echo $this->translate('修改密码'); ?></a>
                                        <a href="javascript:;" onclick="deleteConfirm('<?php echo $this->translate('您确实要删除该核销人员吗?'); ?>', '<?php echo $this->url('self-location', ['action'=>'deleteMember', 'id' => $value[0]->getMemberId()], ['query' => ['qToken' => $this->adminHelper()->getCsrfValue()]]); ?>');" class="btn btn-xs btn-danger"><i class="fa fa-trash"></i> <?php echo $this->translate('删除'); ?></a>

                                    </td>
                                </tr>
                            <?php } ?>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>

    </section>
</div>